com.highdeal.pnr.hci
Class PricingMacroModel

java.lang.Object
  extended by com.highdeal.pnr.hci.PricingMacroModel
All Implemented Interfaces:
ITagNameProvider, XMLMarshallable, ContextualNode, ICatalogObject

public class PricingMacroModel
extends java.lang.Object
implements ContextualNode, XMLMarshallable, ICatalogObject, ITagNameProvider

This class represents a pricing macro.

The currency used in a pricing macro always corresponds to the currency used by the calling charge component.

XML API for HCI

The XML APIs specify the following XSD fragment:

XSD Fragment

<xs:element name="pricingMacro">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="inProperty" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="outProperty" minOccurs="0" maxOccurs="unbounded"/>
       <xs:element ref="component" minOccurs="0" maxOccurs="1"/>
       <xs:element ref="rootChronology" minOccurs="0" maxOccurs="1"/>
     </xs:sequence>
     <xs:attribute name="description" type="xs:string"/>
     <xs:attribute name="owner" type="xs:string" use="required"/>
     <xs:attribute name="currency" type="xs:string" use="optional"/> <!-- deprecated -->
     <xs:attribute name="code" type="xs:string" use="required"/>
     <xs:attribute name="reference" type="xs:string"/>
   </xs:complexType>
 </xs:element>
 <xs:element name="rootChronology">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="chronology" minOccurs="1" maxOccurs="1"/>
     </xs:sequence>
   </xs:complexType>
 </xs:element>


Constructor Summary
PricingMacroModel()
          Builds an empty PricingMacroModel.
PricingMacroModel(java.lang.String code, java.lang.String description, java.lang.String currencyCode)
          Deprecated. Deprecated since version 3.0 of SAP CC
 
Method Summary
 void addCharacterData(java.lang.String cData)
          Adds character data to the content element.
 void addChild(java.lang.String tagName, XMLMarshallable child)
          Adds a child to the object, the child representing the marshallable object which must be added to the element.
 boolean checkValidity()
          Returns true if the pricing macro is valid.
 java.lang.String getCode()
          Gets the code.
 RatingContextDescription getContext(ContextualNode child)
          Updates the context for the specified child and returns it.
 java.lang.String getCurrencyCode()
          Deprecated. Deprecated since version 3.0 of SAP CC
 java.lang.String getDescription()
          Gets the description
 java.util.Vector<InMacroPropertyModel> getInProperties()
          Gets the in properties.
 InMacroPropertyModel getInProperty(java.lang.String name)
          Gets the in property with the specified name.
 java.util.Vector<OutMacroPropertyModel> getOutProperties()
          Gets the out properties.
 java.lang.String getOwner()
          Gets the owner
 java.lang.String getReference()
          Gets the reference.
 RateComponentModel getRoot()
          Gets the root.
 ChronologyModel getRootChronology()
          Gets the root chronology.
 java.lang.String getTagName()
          Gets the XML tag name of the HCI model.
 RatingContextDescription inheritedContext()
          Gets the inherited context.
 void marshal(XMLOutputter output)
          Gives an XML representation of this object, including its children.
 void setAttributes(XMLAttributes atts)
          Sets the attributes of the XML representation of the element being processed.
 void setCode(java.lang.String c)
          Sets the code.
 void setContext(RatingContextDescription contextDescription)
          Sets the context.
 void setCurrencyCode(java.lang.String currencyCode)
          Deprecated. Deprecated since version 3.0 of SAP CC
 void setDescription(java.lang.String d)
          Sets the description
 void setInProperties(java.util.Vector<InMacroPropertyModel> inProperties)
          Sets the in properties.
 void setOutProperties(java.util.Vector<OutMacroPropertyModel> outProperties)
          Sets the out properties.
 void setOwner(java.lang.String p)
          Sets the owner
 void setParent(ContextualNode node)
          Sets the parent.
 void setReference(java.lang.String r)
          Sets the reference.
 void setRoot(RateComponentModel r)
          Sets the root.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PricingMacroModel

public PricingMacroModel()
Builds an empty PricingMacroModel.


PricingMacroModel

@Deprecated
public PricingMacroModel(java.lang.String code,
                                    java.lang.String description,
                                    java.lang.String currencyCode)
Deprecated. Deprecated since version 3.0 of SAP CC

Builds a PricingMacroModel

Parameters:
code - The code of the pricing macro
description - The description of the pricing macro
currencyCode - The currency code of the pricing macro
Method Detail

getReference

public java.lang.String getReference()
Gets the reference.

Returns:
the reference.

setReference

public void setReference(java.lang.String r)
Sets the reference.

Parameters:
r - the reference.

getCode

public java.lang.String getCode()
Gets the code.

Returns:
the code.

setCode

public void setCode(java.lang.String c)
Sets the code.

Parameters:
c - the code.

getRoot

public RateComponentModel getRoot()
Gets the root.

Returns:
the root.

setRoot

public void setRoot(RateComponentModel r)
Sets the root.

Parameters:
r - the root.

getDescription

public java.lang.String getDescription()
Gets the description

Returns:
The description

setDescription

public void setDescription(java.lang.String d)
Sets the description

Parameters:
d - The description

getCurrencyCode

@Deprecated
public java.lang.String getCurrencyCode()
Deprecated. Deprecated since version 3.0 of SAP CC

Gets the currency code

Returns:
null

setCurrencyCode

@Deprecated
public void setCurrencyCode(java.lang.String currencyCode)
Deprecated. Deprecated since version 3.0 of SAP CC

Sets the currency code

Parameters:
currencyCode - the currency code

getOwner

public java.lang.String getOwner()
Gets the owner

Specified by:
getOwner in interface ICatalogObject
Returns:
The owner

setOwner

public void setOwner(java.lang.String p)
Sets the owner

Parameters:
p - the owner

getInProperties

public java.util.Vector<InMacroPropertyModel> getInProperties()
Gets the in properties.

Returns:
a Vector of InMacroPropertyModel.

getInProperty

public InMacroPropertyModel getInProperty(java.lang.String name)
Gets the in property with the specified name.

Parameters:
name - name of the in property to fetch
Returns:
the in property that has the given name (null if not found)

setInProperties

public void setInProperties(java.util.Vector<InMacroPropertyModel> inProperties)
Sets the in properties.

Parameters:
inProperties - a Vector of InMacroPropertyModel.

getOutProperties

public java.util.Vector<OutMacroPropertyModel> getOutProperties()
Gets the out properties.

Returns:
a Vector of OutMacroPropertyModel.

setOutProperties

public void setOutProperties(java.util.Vector<OutMacroPropertyModel> outProperties)
Sets the out properties.

Parameters:
outProperties - a Vector of {link OutMacroPropertyModel OutMacroPropertyModel}.

getRootChronology

public ChronologyModel getRootChronology()
Gets the root chronology.

Returns:
the root chronology.

setParent

public void setParent(ContextualNode node)
Sets the parent.

Specified by:
setParent in interface ContextualNode
Parameters:
node - the parent.

setContext

public void setContext(RatingContextDescription contextDescription)
Sets the context.

Parameters:
contextDescription - the context.

getContext

public RatingContextDescription getContext(ContextualNode child)
Updates the context for the specified child and returns it.

Specified by:
getContext in interface ContextualNode
Parameters:
child - The child node
Returns:
refreshed context.

inheritedContext

public RatingContextDescription inheritedContext()
Gets the inherited context.

Specified by:
inheritedContext in interface ContextualNode
Returns:
the inherited context.

checkValidity

public boolean checkValidity()
Returns true if the pricing macro is valid.

Returns:
true if the pricing macro is valid, false otherwise.

getTagName

public java.lang.String getTagName()
Description copied from interface: ITagNameProvider
Gets the XML tag name of the HCI model.

Specified by:
getTagName in interface ITagNameProvider
Returns:
The XML tag name

setAttributes

public void setAttributes(XMLAttributes atts)
Description copied from interface: XMLMarshallable
Sets the attributes of the XML representation of the element being processed.

Specified by:
setAttributes in interface XMLMarshallable
Parameters:
atts - The XML attributes of the current element

addCharacterData

public void addCharacterData(java.lang.String cData)
Description copied from interface: XMLMarshallable
Adds character data to the content element.

Specified by:
addCharacterData in interface XMLMarshallable
Parameters:
cData - The character data to be added

addChild

public void addChild(java.lang.String tagName,
                     XMLMarshallable child)
Description copied from interface: XMLMarshallable
Adds a child to the object, the child representing the marshallable object which must be added to the element.

Specified by:
addChild in interface XMLMarshallable
Parameters:
tagName - The name of tag for the child
child - The child to be added

marshal

public void marshal(XMLOutputter output)
Description copied from interface: XMLMarshallable
Gives an XML representation of this object, including its children.

Specified by:
marshal in interface XMLMarshallable
Parameters:
output - The XML output to marshal the object into

Document Published: October 2015 (SAP CC 4.0 SP10 and Later)